import 'dart:ffi';

import 'package:protobuf/protobuf.dart';
import 'package:wk_robot2/app/robot_comm/mqtt_comm_manager.dart';
import 'package:wk_robot2/app/robot_comm/msg_callback.dart';

import '../../generated/CmSquareAction.pb.dart';
import 'package:fixnum/fixnum.dart' as $fixnum;

import 'cmd_const.dart';

// MqttCommManager使用示例代码
class Dancemodel{
  void playAction(){
    DoSquareActionRequest doSquareActionRequest = new DoSquareActionRequest(
        resourceName:"001",resourceType:1,unsafeAction:false,resourceUrl:"path",md5:"5",
    );
    // final handler = MsgCallback() {
    //   @override
    //   void onResponse(GeneratedMessage requestMsg){
    //     print('Anonymous object callback received: $message');
    //   }
    // };


    MqttCommManager().sendCmd(CmdConst.IM_ACTION_SQUARE_REQUEST, doSquareActionRequest,(GeneratedMessage requestMsg){
      print('hhh  MyTaskCallback received: $requestMsg');
    });
  }
}